<template>
<uni-shadow-root class="partials-servant_list-type_one-index"><template name="typeOne">
<block v-if="'servantShowWay == 2'">
    <view class="servant_page_container2" :style="'height:'+(servantShowWay==1? '100%':'')+';margin-top:'+(limitState>0?'0':'165rpx')">
        <block v-if="'!!servantList'">
            <view class="servant_list">
                <view v-for="(result,index) in (servantList)" class="servant_item" @click="clickEventFun" :data-link="'servant_detail.html?servantId='+(result.id)">
                    <view class="servant_item_head">
                        <image :src="(result.icon)+'?x-oss-process=style/preview'" class="servant_item_head_img"></image>
                    </view>
                    <view class="servant_item_content">
                        <view class="servant_item_content_top">
                            <text class="servant_item_name">{{result.name}}</text>
                            <scroll-view scroll-x class="tab_scroll_list" scroll-with-animation="true">
                                <view v-for="(item,index) in (result.tagArray)" class="tab_item" :style="'color:'+(setting.platformSetting.defaultColor)+';border:1rpx solid '+(setting.platformSetting.defaultColor)">{{item}}</view>
                            </scroll-view>
                        </view>
                        <view class="servant_item_content_bottom">
                            <view class="servant_item_content_item">
                                <text class="servant_item_content_item_name">归属组织：</text>
                                <text class="servant_item_content_item_value">{{result.belongOrganizeName||'暂无归属'}}</text>
                            </view>
                            <view class="servant_item_content_item">
                                <text class="servant_item_content_item_name">累计志愿服务：</text>
                                <text class="servant_item_content_item_value">{{result.serviceTime||'0'}}小时</text>
                            </view>
                        </view>
                    </view>
                </view>
            </view>
        </block>
        <block v-else>
            <view class="noservant">
                <image mode="widthFix" src="/wxcomponents/images/icons/no-product.png"></image>
                <text>没有服务人员</text>
            </view>
        </block>
    </view>
</block>
</template></uni-shadow-root>
</template>

<script>

global['__wxRoute'] = 'partials/servant_list/type_one/index'

Component({})

export default global['__wxComponents']['partials/servant_list/type_one/index']
</script>
<style platform="mp-weixin">
.servant_page_container2{
  background: #f1f1f1;
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  /* margin-top:165rpx; */
}
/* 新样式 */
.servant_list{
    display: flex;
    flex-direction: column;
    padding: 0 20rpx;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
}
.servant_item{
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 20rpx 0;
    border-bottom: 1rpx solid #ddd;
}
.servant_item:last-child{
    border: none;
}
.servant_item_head{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 140rpx;
    height: 140rpx;
    margin-right: 40rpx;
}
.servant_item_head_img{
   width: 100%;
   height: 100%;
   border-radius: 140rpx;
}
.servant_item_content{
    display: flex;
    flex-direction: column;
}
.servant_item_content_top{
    display: flex;
    flex-direction: row;
    align-items: center;
}
.servant_item_name{
    font-size: 32rpx;
    font-weight: bold;
    margin-right: 16rpx;
}
.tab_scroll_list{
  height:50rpx;
  width:420rpx;
  box-sizing:border-box;
  overflow:hidden;
  line-height:50rpx;
  font-size:20rpx;
  white-space:nowrap;

}
.tab_item{
  margin-left:12rpx;
  height:30rpx;
  display:inline-block;
  border-radius: 6rpx;
  padding: 2rpx 16rpx;
  line-height: 30rpx;
}
.tab_item:first-child{
  margin-left:0
}
.servant_item_content_bottom{
    display: flex;
    flex-direction: column;
    margin-top: 20rpx;
}
.servant_item_content_item{
    display: flex;
    flex-direction: row;
    align-items: center;
    font-size: 28rpx;
    color: #333333;
    margin-bottom: 8rpx;
    letter-spacing: 2rpx;
}
.servant_item_content_item:last-child{
    margin: 0;
}
.servant_item_content_item_name{
    color: #999;
}
.servant_item_content_item_value{
    color: #333;
}
/* 没有商品时 */
.noservant{
  position: absolute;
  top: 170rpx;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: x-small;
}
.noservant image{
  width: 30%;
}
</style>